# encoding=utf8
import sys
import time
import math
reload(sys)
sys.setdefaultencoding('utf8')

class FT_0792:
    result=[]
    analysis0792_list = ["自定义消息体长度：","行程编号：","行程内序号：","行程开始时间：","统计数据项总数：","数据ID：","数据长度：","转速负荷矩阵分布：","数据ID：","数据长度：","发动机怠速区：","档位车速分布（时间)："]
    analysis0792_list_len = [2,4,1,6,1,2,2,400,2,2,2,578]

    def LogicAisle(self, protocolStr, header):
      count = 0
      for i in range(3):
        s = protocolStr[count:count + (self.analysis0792_list_len[i]*2)]
        header.append(self.analysis0792_list[i]+s+'\n')
        count += self.analysis0792_list_len[i]*2

      s = protocolStr[count:count + (self.analysis0792_list_len[3]*2)]
      c = 0
      t = s[c:c + 2]
      header.append(self.analysis0792_list[3]+t)
      c = c + 2
      for i in range(5):
            t = s[c:c + 2]
            header.append("-" + t)
            c = c + 2
      count += self.analysis0792_list_len[3]*2

      s1 = protocolStr[count:count + (self.analysis0792_list_len[4]*2)]
      header.append(self.analysis0792_list[4]+s1+'\n')
      count += self.analysis0792_list_len[4]*2
      for i in range(1):
          if(s1 == 00):
             break
      else:
       for i in range(len(self.analysis0792_list_len) - 5):
             s = protocolStr[count:count + (self.analysis0792_list_len[i+5]*2)]
             header.append(self.analysis0792_list[i+5]+s+'\n')
             count += self.analysis0792_list_len[i+5]*2

      self.result = header
